Skip to content

fix: Memory leak in normalize_http_method#1449

Open
TartanLlama wants to merge 3 commits intomainfrom
sy/normalize-http-method
Open

fix: Memory leak in normalize_http_method#1449
TartanLlama wants to merge 3 commits intomainfrom
sy/normalize-http-method

Conversation

@TartanLlama
Copy link
Copy Markdown
Contributor

normalize_http_method can call malloc without a matching free. The algorithm was also written in very C-like code and the helper function was unnecessary. I've rewritten it in C++, which fixes the memory leak.

There's no test for this, as we don't support LeakSanitizer.

@zkat zkat enabled auto-merge (squash) May 1, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants